package com.open.capacity.notice.enums;

import java.util.Map;

import com.baomidou.mybatisplus.annotation.EnumValue;

import lombok.Getter;

@Getter
public enum RececiverType implements BaseEnum<RececiverType> {

	NULL(0, "未知"), USERID(1, "userId"), MOBILE(2, "手机号"), WECHAT(3, "微信");

	@EnumValue
	private Integer code;
	private String name;

	RececiverType(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public static RececiverType of(Integer code) {
		return BaseEnum.parseByCode(RececiverType.class, code);
	}

	public static Map<Integer, String> toMap() {
		return BaseEnum.toMap(RececiverType.class);
	}

}
